<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jspf/taglibs.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript">
        localPath="form"
    </script>
</head>
<body>
	<div class="box-shadow pos-rlt">
    <div class="p-h-md p-v bg-white box-shadow pos-rlt">
      <h3 class="no-margin have-btn-title">营销表单</h3>
      <div class="pull-right">
            <a  target="_blank" href="http://${form.diyFormDomain }/members/go?member_id=${userContext.member.id}&admin_id=${loginId}" data-confirm="确定进入？" data-method="post" type="button" class="btn btn-sm btn-primary ng-click-active" ui-sref="app.lpadd"
            <c:if test="${userContext.member.operationType==1}">style="display:none"</c:if>
            ><i class="glyphicon glyphicon-plus"></i>
         落地页管理
           </a>
           <a class="btn btn-sm btn-warning" href="/reports/forms?<%= Math.random() %>">查看表单统计</a>
      </div>
    </div>
		<!-- <h3 class="no-margin">营销表单</h3> -->
	</div>
	<div class="p-md" id="add-ads-advert">
		<div class="panel panel-default">
			<div class="panel-heading">营销表单</div>
	<table class="table table-bordered table-hover bg-white">
      <thead>
        <tr>
          <th>页面名称</th>
          <th>创建时间</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody>
        </tbody>
        <colgroup>
        <col width="60%">
        <col >
        <col width="150px">
        </colgroup>
        <tbody>
         <%-- <c:forEach items="${form.page.content }" varStatus="i" var="laddingPage">
         <tr>
          <td>${laddingPage.mainTitle }</td>
          <td><fmt:formatDate value="${laddingPage.createdAt }" pattern="yyyy-MM-dd"/></td>
        <c:choose>
        <c:when test="${userContext.member.operationType==1&&userContext.fromBackend ==false}">
        <td><span name="deleteOrEdit" class="" ><a href="/forms/datail/${laddingPage.id }">预览<i class="m-l-sm"></i></a></span></td>
        </c:when>
        <c:otherwise>
       <td><span name="deleteOrEdit" class="" ><a href="/forms/datail/${laddingPage.id }">预览<i class="m-l-sm"></i></a><a   href="/forms/update/${laddingPage.id }">编辑<i class=" m-l-sm"></i></a><a href="/forms/delete/${laddingPage.id }">删除<i class="m-l-sm"></i></a></span></td>
        </c:otherwise>
        </c:choose>  
        </tr>
        </c:forEach>--%>
          <c:forEach items="${form.page.content }" varStatus="i" var="page">
              <tr>
                  <td>${page.name }</td>
                  <td><fmt:formatDate value="${page.createdAt }" pattern="yyyy-MM-dd"/></td>
                          <td><span name="deleteOrEdit" class="" ><a href="/forms/diy_form_datail_diy/${page.id }">预览<i class="m-l-sm"></i></a></span></td>
              </tr>
          </c:forEach>
      </tbody>
      <tfoot>
        <tr>
          <td colspan="9" class="text-center">
   		<airad:pagination pageSize="${form.page.pageSize }"
			href="/forms?pageNumber=PAGENUM"
			totalRecord="${form.page.totalCount }"
			currentPage="${form.page.pageNumber }"
			>
		</airad:pagination>
            </td>
        </tr>
      </tfoot>
    </table>
		</div>
	</div>
</body>
</html>